package edu.gyc.hisecurity.service;

import org.springframework.security.access.annotation.Secured;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Service;

@Service
public class GirlService {

    @PreAuthorize("hasRole('admin')")
    public String admin() {
        return "Hi 赵雨静的丝袜";
    }

    @Secured("ROLE_lover")
    public String lover() {
        return "Hi 赵雨静的爱人ls！";
    }

    @PreAuthorize("hasAnyRole('admin','lover')")
    public String love() {
        return "赵雨静 devote her 初夜 for you!";
    }
}
